package org.jcc.core.thread;

public class ThreadFoo extends Thread {

	public static void main(String[] args) throws InterruptedException {
		ThreadFoo foo = new ThreadFoo();
		foo.start();
		Thread.sleep(1000);
		if (!foo.isInterrupted()) {
			foo.interrupt();
		}
	}
	
	@Override
	public void run() {
		try {
			System.out.println("i am running...");
			sleep(3000);
			System.out.println("hello world after sleep 3 seconds!");
		} catch (InterruptedException e) {
			System.out.println("oohs, interrupted....");
			e.printStackTrace();
		}
	}
	

	
	
}
